"use strict";
class Person {
    constructor(name, age) {
        this.name = name;
        this.age = age;
    }
    speak() {
        console.log(`我叫${this.name}，今年${this.age}岁`);
    }
}
const p1 = new Person('wbw', 18);
p1.speak();
class Student extends Person {
    constructor(name, age, grade) {
        super(name, age);
        this.grade = grade;
    }
    study() {
        console.log(`${this.name}正在努力学习`);
    }
    // 覆写父类的这个方法
    speak() {
        console.log(`我是学生叫${this.name}，今年${this.age}岁`);
    }
}
const s1 = new Student('李四', 16, '高三');
s1.study();
s1.speak();
